package fr.ttalbot.flex.effects
{
	import fr.ttalbot.flex.effects.instances.ArcInstance;
	
	import mx.effects.Effect;
	import mx.effects.IEffectInstance;

	/**
	 * 
	 */
	public class Arc extends Effect
	{
		public var xBy: Number;
		public var yBy: Number;
		public var xTo: Number;
		public var yTo: Number;
		public var radius: int;
		public var angle: Number;
		
		private static var AFFECTED_PROPERTIES:Array = [ "x", "y" ];
		
		
		// ***************************************************************** //
		// ************************** CONSTRUCTOR ************************** //
		// ***************************************************************** //
		
		public function Arc(target:Object=null) {
			super(target);
			instanceClass = ArcInstance;
		}
		
		override public function getAffectedProperties(): Array {
        	return AFFECTED_PROPERTIES;
    	}
    	
    	override protected function initInstance(instance: IEffectInstance): void {
        	super.initInstance(instance);
        
        	var arcInstance:ArcInstance = ArcInstance(instance);

	        arcInstance.xBy = xBy;
	        arcInstance.yBy = yBy;
	        arcInstance.xTo = xTo;
	        arcInstance.yTo = yTo;
	        arcInstance.angle = angle;
	        arcInstance.radius = radius;
    	}
		
	}
}